<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-once示例</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>
<body>
    <div id="app">
        <p v-once>不可改变:{{msg}}</p>
        <p>可以改变:{{msg}}</p>
        <p><input type="text" v-model="msg" name=""></p>
    </div>

    <script>
        new Vue({
            el:"#app",
            data:{
                msg:"hello"
            }
        })
    </script>
</body>
</html>
